/**
 * @file   main.cpp
 * @brief  导航模块main文件
 * @encode UTF-8
 * @log    date        author      notes
 *         2021.09.01  Jimmy       first version
 */
#include <iostream>
#include <unistd.h>
#include <signal.h>
#include <chrono>
#include <thread>
#include "navigator.h"

#include "inner_libs/usr/include/debug_log/log.h"

void sigCtrlC(int sig_num)
{
    log_shell::LOG_INFO("Bye-bye\r\n");
    signal(SIGINT, SIG_DFL);    /* 执行系统默认动作 */

    exit(0);
}

/**
 * @brief  main 函数
 * @param  argc             
 * @param  argv             
 * @return int 
 * @author Jimmy 
 * @date   2021.09.01
 */
int main(int argc, char ** argv)
{
    log_shell::LOG_INFO("navigator module process\r\n");

    int ret = log_shell::DebugLog::init(true, log_shell::LOG_LEVEL_DEBUG);
    if (ret != 0)
    {
        return 1;
    }
    auto navi = std::make_unique<Navigator> ();

    signal(SIGINT, sigCtrlC);

    while(true)
    {
        sleep(1);
    }

    return 0;
}


/* End of file */
